docs: fix palette explorer export and frame the palettes page#629
Merged
Conversation
The palette explorer's Copy Config button emitted a fully commented-out colors block, so pasting its output produced a theme with no colors; the click path emitted keyless token lines that were invalid once uncommented. onExport now emits real, uncommented config: clicked swatches map to theme roles in click order, and the no-click default seeds primary/secondary from hues that actually exist in the selected palette so the reference resolves. Adds framing prose above the explorer (static vs generator, token-reference syntax, axis-flip note) and an in-widget hint explaining click-to-copy.
Clicking swatches now drives the export, but nothing showed what was selected. Adds a summary chip row (swatch color, mapped role, token path) with per-chip remove and a Clear button, plus a selected outline on each picked swatch so the grid and the export stay in sync. Relabels the static Material entry to 'Material 3' to disambiguate it from the Material generator section further down the page.
johnleider
marked this pull request as ready for review
July 18, 2026 00:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
/guide/features/palettespage rated poorly for being confusing. Root causes, all in the interactive explorer at the top of the page:onExportproduced acolorsblock where every line was commented out — pasting it gave a theme with no colors (silent no-op). The click path was worse: bare token strings with no role key, invalid once uncommented.{palette.…}token syntax were never framed before the widget.Changes
Export
onExportnow emits real, uncommented config. Clicked swatches map to theme roles (primary,secondary, …) in click order; the no-click default seedsprimary/secondaryfrom hues that actually exist in the selected palette (the old default hardcodedblue.500/slate.600, absent outside Tailwind).Selection state
Framing
Verification
vue-tsconapps/docs: 0 errors. ESLint clean.AppCloseButtonconfirmed auto-registered.fs.watchhitsENOSPCon WSL, unrelated to this change). The interactive additions are straightforward reactive-Map bindings, but a click-through before merge is still worth doing.